﻿package mortal.game.view.guildNew.manor
{
    import flash.events.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.guildNew.data.*;
    import mortal.mvc.core.*;

    public class GuildNewFruitsIcon extends ActionBaseIcon
    {
        private static var _instance:GuildNewFruitsIcon;

        public function GuildNewFruitsIcon()
        {
            super(ResFileConst.GuildFriutIcon);
            return;
        }// end function

        public function setShowState(param1:Date, param2:int = 1) : void
        {
            var _loc_3:* = (param1.time - ClockManager.instance.nowDate.time) / 1000;
            setLeftTimeAndState(_loc_3, param2);
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(GuildNewLocalEvent.GuildNewOpenGardenP));
            return;
        }// end function

        public static function get instance() : GuildNewFruitsIcon
        {
            if (!_instance)
            {
                _instance = new GuildNewFruitsIcon;
            }
            return _instance;
        }// end function

        public static function hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

    }
}
